import request from '@/utils/request'

const sysMenuGroupApi = {
  Index: '/sys-menu-group/index',
  Save: '/sys-menu-group/save',
  Del: '/sys-menu-group/destroy'
}

/**
 * 载入菜单分组数据
 * @param parameter
 * @returns {*}
 */
export function getList (parameter) {
  return request({
    url: sysMenuGroupApi.Index,
    method: 'get',
    params: parameter
  })
}

/**
 * 保存分组数据
 * @param postData
 * @returns {requestPromise}
 */
export function saveData (postData) {
    return request({
        url: sysMenuGroupApi.Save,
        method: 'post',
        data: postData
    })
}
/**
 * 删除分组
 * @param array groupId
 * @returns {requestPromise}
 */
export function delData (groupIds) {
    return request({
        url: sysMenuGroupApi.Del,
        method: 'post',
        data: { ids: groupIds }
    })
}
